﻿@using GTAuto.DAL.DAL
@using GTAuto.DAL.Entities
@model GTAuto.DAL.Entities.GTModel
@{
    ViewBag.Title = "DiscByModel";
    Layout = "~/Views/Shared/_Layout.cshtml";
    List<GTModel> models = ViewBag.Models;

    List<GTModelModification> gtModelModifications = ViewBag.Mods;
}
<div id="list">
    @Html.Partial("Controls/BreadCrumbs")
    @Html.Partial("Controls/Favorites")
</div>
<div id="main_left">
    @Html.Partial("Controls/DiscModels", models)
</div>

<div id="main_center">
    <div class="opisanie_shini_block">
        <div class="title">
            @Model.Name</div>
        <div class="opisanie_shini">
            <div class="opisanie_shini_left">
                <img src="@Url.Action("GetInSize195", "Img", new { @id = Model.Logo })" alt="" />
            </div>
            <div class="opisanie_shini_right">
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <span>Модель:</span>
                        </td>
                        <td>
                            <span>@Model.Name</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <span>Описание:</span>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
                <div>
                    @Model.Description
                </div>
            </div>
            <div class="clear">
            </div>
        </div>
    </div>
    <div class="table_2_block">
        <div class="title">
            Модификации данной модели</div>
        <table cellpadding="0" cellspacing="0">
            <tr class="table_2_title">
                <td class="tab_2_td_1">
                    Диаметр
                </td>
                <td class="tab_2_td_2">
                    Меж. болт. расс.
                </td>
                <td class="tab_2_td_3">
                    Чис. отв.
                </td>
                <td class="tab_2_td_4">
                    Вылет
                </td>
            </tr>
            @foreach (var mod in gtModelModifications)
            {
                <tr>
                    <td class="tab_2_td_1">
                        @DALModificationPropertyValue.Singleton.GetPropVal(mod.Id, 20) 
                    </td>
                    <td class="tab_2_td_2">
                        @DALModificationPropertyValue.Singleton.GetPropVal(mod.Id,21) 
                    </td>
                    <td class="tab_2_td_3">
                        @DALModificationPropertyValue.Singleton.GetPropVal(mod.Id,22)
                    </td>
                    <td class="tab_2_td_4">
                        @DALModificationPropertyValue.Singleton.GetPropVal(mod.Id,23)
                    </td>
                </tr>
            }
        </table>
    </div>
</div>

<div id="main_right">
    @Html.Partial("Controls/Bunner")
    @Html.Partial("Controls/Reklama")
</div>
